package com.hexinfo.dmpro.dev.data.transfer.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.validation.annotation.Validated;

import java.util.Date;
import java.util.List;

@Data
@Validated
@TableName("TD_DESENSITIZE_FIELD_FILTER")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "脱敏字段黑名单")
@Accessors(chain = true)
public class DesensitizeFieldFilter extends Model<DesensitizeFieldFilter> {

    /**
     * ID
     */
    @TableId(type= IdType.ASSIGN_UUID)
    @ApiModelProperty(value="ID")
    private String id;

    /**
     * 库名
     */
    @ApiModelProperty(value="库名")
    private String databaseName;

    /**
     * 表名
     */
    @ApiModelProperty(value="表名")
    private String tableName;

    /**
     * 字段名
     */
    @ApiModelProperty(value="字段名")
    private String fieldName;

    /**
     * 字段名列表
     */
    @ApiModelProperty(value="字段名列表")
    @TableField(exist = false)
    private List<String> fieldNameList;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String lastUpdateBy;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastUpdateTime;
    /**
     * 删除标识
     */
    @ApiModelProperty(value = "删除标识")
    @TableField(fill = FieldFill.INSERT)
    private String del;

}
